using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._GeostatisticalAnalystTools._Interpolation
{
    /// <summary>
    /// <para>IDW</para>
    /// <para>Uses the measured values surrounding the prediction location  to predict a value for any unsampled location, based on the assumption that things that are close to one another are more alike than those that are farther apart.</para>
    /// <para>使用预测位置周围的测量值来预测任何未采样位置的值，前提是彼此接近的事物比相距较远的事物更相似。</para>
    /// </summary>    
    [DisplayName("IDW")]
    public class IDW : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public IDW()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_features">
        /// <para>Input features</para>
        /// <para>The input point features containing the z-values to be interpolated.</para>
        /// <para>包含要插值的 z 值的输入点要素。</para>
        /// </param>
        /// <param name="_z_field">
        /// <para>Z value field</para>
        /// <para>Field that holds a height or magnitude value for each point. This can be a numeric field or the Shape field if the input features contain z-values or m-values.</para>
        /// <para>保存每个点的高度或大小值的字段。这可以是数值字段，也可以是形状字段（如果输入要素包含 z 值或 m 值）。</para>
        /// </param>
        public IDW(object _in_features, object _z_field)
        {
            this._in_features = _in_features;
            this._z_field = _z_field;
        }
        public override string ToolboxName => "Geostatistical Analyst Tools";

        public override string ToolName => "IDW";

        public override string CallName => "ga.IDW";

        public override List<string> AcceptEnvironments => ["cellSize", "coincidentPoints", "extent", "geographicTransformations", "mask", "outputCoordinateSystem", "parallelProcessingFactor", "snapRaster", "workspace"];

        public override object[] ParameterInfo => [_in_features, _z_field, _out_ga_layer, _out_raster, _cell_size, _power, _search_neighborhood, _weight_field];

        /// <summary>
        /// <para>Input features</para>
        /// <para>The input point features containing the z-values to be interpolated.</para>
        /// <para>包含要插值的 z 值的输入点要素。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_features { get; set; }


        /// <summary>
        /// <para>Z value field</para>
        /// <para>Field that holds a height or magnitude value for each point. This can be a numeric field or the Shape field if the input features contain z-values or m-values.</para>
        /// <para>保存每个点的高度或大小值的字段。这可以是数值字段，也可以是形状字段（如果输入要素包含 z 值或 m 值）。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Z value field")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _z_field { get; set; }


        /// <summary>
        /// <para>Output geostatistical layer</para>
        /// <para>The geostatistical layer produced. This layer is required output only if no output raster is requested.</para>
        /// <para>生成的地统计图层。仅当未请求输出栅格时，此图层才是必需的输出。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output geostatistical layer")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _out_ga_layer { get; set; } = null;


        /// <summary>
        /// <para>Output raster</para>
        /// <para>The output raster. This raster is required output only if no output geostatistical layer is requested.</para>
        /// <para>输出栅格。仅当未请求输出地统计图层时，此栅格才是必需的输出。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output raster")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _out_raster { get; set; } = null;


        /// <summary>
        /// <para>Output cell size</para>
        /// <para><xdoc>
        ///   <para>The cell size at which the output raster will be created.</para>
        ///   <para>This value can be explicitly set in the Environments by the Cell Size parameter.</para>
        ///   <para>If not set, it is the shorter of the width or the height of the extent of the input point features, in the input spatial reference, divided by 250.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>将创建输出栅格的像元大小。</para>
        ///   <para>此值可以通过像元大小参数在“环境”中显式设置。</para>
        ///   <para>如果未设置，则为输入空间参考中输入点要素范围的宽度或高度除以 250 的较短者。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output cell size")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _cell_size { get; set; } = null;


        /// <summary>
        /// <para>Power</para>
        /// <para>The exponent of distance that controls the significance of surrounding points on the interpolated value. A higher power results in less influence from distant points.</para>
        /// <para>距离的指数，用于控制周围点在插值上的显著性。功率越高，来自远处的影响越小。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Power")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double _power { get; set; } = 2;


        /// <summary>
        /// <para>Search neighborhood</para>
        /// <para><xdoc>
        ///   <para>Defines which surrounding points will be used to control the output. Standard is the default.</para>
        ///   <para>Standard</para>
        ///   <bulletList>
        ///     <bullet_item>Major semiaxis—The major semiaxis value of the searching neighborhood.</bullet_item><para/>
        ///     <bullet_item>Minor semiaxis—The minor semiaxis value of the searching neighborhood.</bullet_item><para/>
        ///     <bullet_item>Angle—The angle of rotation for the axis (circle) or semimajor axis (ellipse) of the moving window.</bullet_item><para/>
        ///     <bullet_item>Max neighbors—The maximum number of neighbors that will be used to estimate the value at the unknown location.</bullet_item><para/>
        ///     <bullet_item>Min neighbors—The minimum number of neighbors that will be used to estimate the value at the unknown location.</bullet_item><para/>
        ///     <bullet_item>Sector Type—The geometry of the neighborhood.
        ///     <bulletList>
        ///       <bullet_item>One sector—Single ellipse.  </bullet_item><para/>
        ///       <bullet_item>Four sectors—Ellipse divided into four sectors.  </bullet_item><para/>
        ///       <bullet_item>Four sectors shifted—Ellipse divided into four sectors and shifted 45 degrees.  </bullet_item><para/>
        ///       <bullet_item>Eight sectors—Ellipse divided into eight sectors.  </bullet_item><para/>
        ///     </bulletList>
        ///     </bullet_item><para/>
        ///   </bulletList>
        ///   <para>Smooth</para>
        ///   <bulletList>
        ///     <bullet_item>Major semiaxis—The major semiaxis value of the searching neighborhood.</bullet_item><para/>
        ///     <bullet_item>Minor semiaxis—The minor semiaxis value of the searching neighborhood.</bullet_item><para/>
        ///     <bullet_item>Angle—The angle of rotation for the axis (circle) or semimajor axis (ellipse) of the moving window.</bullet_item><para/>
        ///     <bullet_item>Smoothing factor—The Smooth Interpolation option creates an outer ellipse and an inner ellipse at a distance equal to the Major Semiaxis multiplied by the Smoothing factor. The points that fall outside the smallest ellipse but inside the largest ellipse are weighted using a sigmoidal function with a value between zero and one.</bullet_item><para/>
        ///   </bulletList>
        ///   <para>Standard Circular</para>
        ///   <bulletList>
        ///     <bullet_item>Radius—The length of the radius of the search circle.</bullet_item><para/>
        ///     <bullet_item>Angle—The angle of rotation for the axis (circle) or semimajor axis (ellipse) of the moving window.</bullet_item><para/>
        ///     <bullet_item>Max neighbors—The maximum number of neighbors that will be used to estimate the value at the unknown location.</bullet_item><para/>
        ///     <bullet_item>Min neighbors—The minimum number of neighbors that will be used to estimate the value at the unknown location.</bullet_item><para/>
        ///     <bullet_item>Sector Type—The geometry of the neighborhood.
        ///     <bulletList>
        ///       <bullet_item>One sector—Single ellipse.  </bullet_item><para/>
        ///       <bullet_item>Four sectors—Ellipse divided into four sectors.  </bullet_item><para/>
        ///       <bullet_item>Four sectors shifted—Ellipse divided into four sectors and shifted 45 degrees.  </bullet_item><para/>
        ///       <bullet_item>Eight sectors—Ellipse divided into eight sectors.  </bullet_item><para/>
        ///     </bulletList>
        ///     </bullet_item><para/>
        ///   </bulletList>
        ///   <para>Smooth Circular</para>
        ///   <bulletList>
        ///     <bullet_item>Radius—The length of the radius of the search circle.</bullet_item><para/>
        ///     <bullet_item>Smoothing factor—The Smooth Interpolation option creates an outer ellipse and an inner ellipse at a distance equal to the Major Semiaxis multiplied by the Smoothing factor. The points that fall outside the smallest ellipse but inside the largest ellipse are weighted using a sigmoidal function with a value between zero and one.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>定义将用于控制输出的周围点。标准是默认值。</para>
        ///   <para>标准</para>
        ///   <bulletList>
        ///     <bullet_item>主半轴 - 搜索邻域的主半轴值。</bullet_item><para/>
        ///     <bullet_item>小半轴 - 搜索邻域的短半轴值。</bullet_item><para/>
        ///     <bullet_item>角度 （Angle） - 移动窗口的轴（圆）或半长轴（椭圆）的旋转角度。</bullet_item><para/>
        ///     <bullet_item>最大邻居数 - 将用于估计未知位置值的最大邻居数。</bullet_item><para/>
        ///     <bullet_item>最小邻居 - 将用于估计未知位置的值的最小邻居数。</bullet_item><para/>
        /// <bullet_item>扇区类型 - 邻域的几何。
        ///     <bulletList>
        ///       <bullet_item>一个扇区 - 单个椭圆。</bullet_item><para/>
        ///       <bullet_item>四个扇区 - 椭圆分为四个扇区。</bullet_item><para/>
        ///       <bullet_item>四个扇区移动 - 椭圆分为四个扇区并移动 45 度。</bullet_item><para/>
        ///       <bullet_item>八个扇区 - 椭圆分为八个扇区。</bullet_item><para/>
        ///     </bulletList>
        ///     </bullet_item><para/>
        ///   </bulletList>
        ///   <para>光滑</para>
        ///   <bulletList>
        ///     <bullet_item>主半轴 - 搜索邻域的主半轴值。</bullet_item><para/>
        ///     <bullet_item>小半轴 - 搜索邻域的短半轴值。</bullet_item><para/>
        ///     <bullet_item>角度 （Angle） - 移动窗口的轴（圆）或半长轴（椭圆）的旋转角度。</bullet_item><para/>
        ///     <bullet_item>平滑因子 - “平滑插值”（Smooth Interpolation） 选项在距离等于“主半轴”乘以“平滑因子”（Smoothing factor） 的距离处创建外椭圆和内椭圆。对于位于最小椭圆之外但在最大椭圆内的点，使用值介于 0 和 1 之间的 S 形函数进行加权。</bullet_item><para/>
        ///   </bulletList>
        ///   <para>标准通函</para>
        ///   <bulletList>
        ///     <bullet_item>半径 - 搜索圆半径的长度。</bullet_item><para/>
        ///     <bullet_item>角度 （Angle） - 移动窗口的轴（圆）或半长轴（椭圆）的旋转角度。</bullet_item><para/>
        ///     <bullet_item>最大邻居数 - 将用于估计未知位置值的最大邻居数。</bullet_item><para/>
        ///     <bullet_item>最小邻居 - 将用于估计未知位置的值的最小邻居数。</bullet_item><para/>
        /// <bullet_item>扇区类型 - 邻域的几何。
        ///     <bulletList>
        ///       <bullet_item>一个扇区 - 单个椭圆。</bullet_item><para/>
        ///       <bullet_item>四个扇区 - 椭圆分为四个扇区。</bullet_item><para/>
        ///       <bullet_item>四个扇区移动 - 椭圆分为四个扇区并移动 45 度。</bullet_item><para/>
        ///       <bullet_item>八个扇区 - 椭圆分为八个扇区。</bullet_item><para/>
        ///     </bulletList>
        ///     </bullet_item><para/>
        ///   </bulletList>
        ///   <para>光滑的圆形</para>
        ///   <bulletList>
        ///     <bullet_item>半径 - 搜索圆半径的长度。</bullet_item><para/>
        ///     <bullet_item>平滑因子 - “平滑插值”（Smooth Interpolation） 选项在距离等于“主半轴”乘以“平滑因子”（Smoothing factor） 的距离处创建外椭圆和内椭圆。对于位于最小椭圆之外但在最大椭圆内的点，使用值介于 0 和 1 之间的 S 形函数进行加权。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Search neighborhood")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _search_neighborhood { get; set; } = null;


        /// <summary>
        /// <para>Weight field</para>
        /// <para>Used to emphasize an observation. The larger the weight, the more impact it has on the prediction. For coincident observations, assign the largest weight to the most reliable measurement.</para>
        /// <para>用于强调观察结果。权重越大，对预测的影响就越大。对于重合观测值，将最大权重分配给最可靠的测量值。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Weight field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _weight_field { get; set; } = null;


        public IDW SetEnv(object cellSize = null, object coincidentPoints = null, object extent = null, object geographicTransformations = null, object mask = null, object outputCoordinateSystem = null, object parallelProcessingFactor = null, object snapRaster = null, object workspace = null)
        {
            base.SetEnv(cellSize: cellSize, coincidentPoints: coincidentPoints, extent: extent, geographicTransformations: geographicTransformations, mask: mask, outputCoordinateSystem: outputCoordinateSystem, parallelProcessingFactor: parallelProcessingFactor, snapRaster: snapRaster, workspace: workspace);
            return this;
        }

    }

}